<Project Sdk="Microsoft.NET.Sdk">

  <PropertyGroup>
    <TargetFrameworks>$(NetCoreAppCurrent)-windows;$(NetCoreAppCurrent)-unix;$(NetCoreAppCurrent)-browser;$(NetCoreAppCurrent)</TargetFrameworks>
    <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
    <UseCompilerGeneratedDocXmlFile>false</UseCompilerGeneratedDocXmlFile>
  </PropertyGroup>

  <!-- DesignTimeBuild requires all the TargetFramework Derived Properties to not be present in the first property group. -->
  <PropertyGroup>
    <TargetPlatformIdentifier>$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)'))</TargetPlatformIdentifier>
    <GeneratePlatformNotSupportedAssemblyMessage Condition="'$(TargetPlatformIdentifier)' == ''">SR.PlatformNotSupported_WebSockets</GeneratePlatformNotSupportedAssemblyMessage>
  </PropertyGroup>

  <ItemGroup Condition="'$(TargetPlatformIdentifier)' != ''">
    <Compile Include="System\Net\WebSockets\AsyncMutex.cs" />
    <Compile Include="System\Net\WebSockets\Compression\WebSocketDeflater.cs" />
    <Compile Include="System\Net\WebSockets\Compression\WebSocketInflater.cs" />
    <Compile Include="System\Net\WebSockets\ManagedWebSocket.cs" />
    <Compile Include="System\Net\WebSockets\ValueWebSocketReceiveResult.cs" />
    <Compile Include="System\Net\WebSockets\WebSocket.cs" />
    <Compile Include="System\Net\WebSockets\WebSocketCloseStatus.cs" />
    <Compile Include="System\Net\WebSockets\WebSocketContext.cs" />
    <Compile Include="System\Net\WebSockets\WebSocketCreationOptions.cs" />
    <Compile Include="System\Net\WebSockets\WebSocketDeflateOptions.cs" />
    <Compile Include="System\Net\WebSockets\WebSocketError.cs" />
    <Compile Include="System\Net\WebSockets\WebSocketException.cs" />
    <Compile Include="System\Net\WebSockets\WebSocketMessageType.cs" />
    <Compile Include="System\Net\WebSockets\WebSocketMessageFlags.cs" />
    <Compile Include="System\Net\WebSockets\WebSocketReceiveResult.cs" />
    <Compile Include="System\Net\WebSockets\WebSocketState.cs" />
    <Compile Include="$(CommonPath)System\Net\WebSockets\WebSocketValidate.cs"
             Link="Common\System\Net\WebSockets\WebSocketValidate.cs" />
    <Compile Include="$(CommonPath)System\IO\Compression\ZLibNative.cs"
             Link="Common\System\IO\Compression\ZLibNative.cs" />
    <Compile Include="$(CommonPath)System\IO\Compression\ZLibNative.ZStream.cs"
             Link="Common\System\IO\Compression\ZLibNative.ZStream.cs" />
    <Compile Include="$(CommonPath)Interop\Interop.zlib.cs"
             Link="Common\Interop\Interop.zlib.cs" />
    <Compile Include="$(CommonPath)System\Obsoletions.cs"
             Link="Common\System\Obsoletions.cs" />
  </ItemGroup>

  <!-- Windows specific files -->
  <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'windows'">
    <Compile Include="$(CommonPath)Interop\Windows\Interop.Libraries.cs"
             Link="Common\Interop\Windows\Interop.Libraries.cs" />
  </ItemGroup>

  <!-- Unix specific files -->
  <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'unix' or '$(TargetPlatformIdentifier)' == 'browser' ">
    <Compile Include="$(CommonPath)Interop\Unix\Interop.Libraries.cs"
             Link="Common\Interop\Unix\Interop.Libraries.cs" />
  </ItemGroup>

  <ItemGroup>
    <Reference Include="Microsoft.Win32.Primitives" />
    <Reference Include="System.Collections.Specialized" />
    <Reference Include="System.Collections" />
    <Reference Include="System.Memory" />
    <Reference Include="System.Net.Primitives" />
    <Reference Include="System.Numerics.Vectors" />
    <Reference Include="System.Runtime" />
    <Reference Include="System.Runtime.InteropServices" />
    <Reference Include="System.Security.Cryptography" />
    <Reference Include="System.Text.Encoding.Extensions" />
    <Reference Include="System.Threading" />
  </ItemGroup>

</Project>
